It's generally more useful to see when a person sent a message instead of when
we received it. Also, a recent change in Telepathy made the received timestamp
be 0 for messages we send.
https://bugzilla.gnome.org/show_bug.cgi?id=640271
function makeMessageFromTpMessage(tpMessage, direction) {
let [text, flags] = tpMessage.to_text();
+
+ let timestamp = tpMessage.get_sent_timestamp();
+ if (timestamp == 0)
+ timestamp = tpMessage.get_received_timestamp();
+
return {
messageType: tpMessage.get_message_type(),
text: text,
sender: tpMessage.sender.alias,
- timestamp: tpMessage.get_received_timestamp(),
+ timestamp: timestamp,
direction: direction
};
}